package com.wsl.service.user;

import com.alibaba.fastjson.JSONObject;
import com.wsl.Date.DateUtil;
import com.wsl.Uuid.UuidUtils;
import com.wsl.entity.user.User;
import org.springframework.stereotype.Service;

/**
 * @Author: wsl
 * @Date: 2022/4/1 10:16
 */
@Service
public class UserService {


    //用户注册
    public JSONObject registerUser(String userName, String pwd, String nickName, String email){

        User user = new User();
        user.setUsername(userName);
        user.setPassword(pwd);
        user.setNickname(nickName);
        user.setEmail(email);
        user.setCode(UuidUtils.getDateUUidUpperCase());
        user.setCreateTime(DateUtil.getNowDate());
        user.setSalt(UuidUtils.getUUIDLength(8));
        return null;
    }



}